public class IdeaControllerExtension { 

    public List<Community> community {get; set;}
    public String selectedCommunity {get; set;}

    public IdeaControllerExtension(ApexPages.StandardSetController controller) {
         community = [Select Name From Community];
    }
    public List<SelectOption> getCommunityOptions() {
        List<SelectOption> options = new List<SelectOption>();
        for (Community theComm : community) {
           options.add(new SelectOption(theComm.Name,theComm.Name));
        }
        return options;
     }
     public PageReference newCommunity() {
         // Additional logic to update data based on selected community
         return null;
     }
 }